﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Transitions="clr-namespace:Phoenix.Extensions.Transitions"
                    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit">

    <Style TargetType="Transitions:TransitionNavigationFrame">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Transitions:TransitionNavigationFrame">
                    <Grid Background="{TemplateBinding Background}">
                        <StackPanel HorizontalAlignment="Stretch"
                                    VerticalAlignment="Center"
                                    IsHitTestVisible="False">
                            <toolkit:PerformanceProgressBar IsIndeterminate="{TemplateBinding ShowProgressBar}"
                                                            Visibility="{TemplateBinding ProgressBarVisibility}" />
                            <ContentPresenter x:Name="PART_ProgressIndicator"
                                              HorizontalAlignment="Center"
                                              VerticalAlignment="Center"
                                              Content="{TemplateBinding LoadingMessage}"
                                              Visibility="{TemplateBinding ProgressBarVisibility}" />
                        </StackPanel>

                        <ContentControl IsHitTestVisible="{TemplateBinding IsContentEnabled}"
                                        Opacity="{Binding ContentOpacity, RelativeSource={RelativeSource TemplatedParent}}"
                                        HorizontalAlignment="Stretch"
                                        VerticalAlignment="Stretch"
                                        HorizontalContentAlignment="Stretch"
                                        VerticalContentAlignment="Stretch">

                            <Grid HorizontalAlignment="Stretch"
                                  VerticalAlignment="Stretch">
                                <ContentPresenter x:Name="FirstContentPresenter"
                                                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                                <ContentPresenter x:Name="SecondContentPresenter"
                                                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                            </Grid>
                        </ContentControl>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>